<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>

<html>
	<head>
		<meta charset="UTF-8" />
		<link rel="stylesheet" type="text/css" href="../style/style.css" />
		<title>Mon profil</title>
	</head>
	<body>
		<%@ include file="/template/header.jsp" %>
			<section id="content">
			<h4>Information personnelles</h4>
			<form method="POST" action="showProfil" >
				<div>
					<% if(request.getAttribute("modified") != null) { %>
					Modifications enregistrés.<BR/>
					<% } %>
					<label>Nom:</label>
					<input type="text" name="name" id="name" value= "${infoUser.name}"/><BR/>
					<label>Prénom:</label>
					<input type="text" name="firstname" id="firstname" value= "${infoUser.firstname}"/><BR/>
					<label>Email:</label>
					<input type="text" name="email" id="email" value= "${infoUser.email}"/><BR/>
					<input type="submit" value="Enregistrer" />
				</div>
			</form>
		</section>
		<section id=content>
			<h4>Mes projets</h4>			
			<c:choose>
				<c:when test="${empty projectUser}">
					<p>Nous n'avez pas de projet.</p>
				</c:when>
				<c:otherwise>
						<c:forEach items="${projectUser}" var="project">
							<ul style="list-style-type:none;">
								<li><a href="<%= contextPath %>/showProject?id=${project.idProject}">${project.name}</a></li>
							</ul>
						</c:forEach>
				</c:otherwise>
			</c:choose>
		</section>
		<%@ include file="/template/footer.jsp" %>
	</body>
</html>